package edu.spangler.dang.FriendViewer;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TextView;

/**
 * Activity that simply displays the user's information
 * represented as pins on a map.
 * @author Tuan Dang
 */
public class ViewContact extends Activity {

	private TextView username;
	private TextView latitude;
	private TextView longitude;
	
	/**
	 * Creates the GUI screen.
	 */
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.contact);
		
		Intent prevIntent = this.getIntent();
		username = (TextView) findViewById(R.id.username);
		latitude = (TextView) findViewById(R.id.latitude);
		longitude = (TextView) findViewById(R.id.longitude);
		
		username.setText(prevIntent.getStringExtra("username"));
		latitude.setText("Latitude: " + Double.toString(prevIntent.getDoubleExtra("latitude", 0)));
		longitude.setText("Longitude: " + Double.toString(prevIntent.getDoubleExtra("longitude", 0)));
	}
}
